3.116 \(\int \frac{A+B x^2}{x (a+b x^2+c x^4)^2} \, dx\)

Optimal. Leaf size=150 \[ \frac{\left (4 a^2 B c+A \left (b^3-6 a b c\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{3/2}}-\frac{A \log \left (a+b x^2+c x^4\right )}{4 a^2}+\frac{A \log (x)}{a^2}-\frac{-A \left (b^2-2 a c\right )+c x^2 (-(A b-2 a B))+a b B}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )} \]

[Out]

-(a*b*B - A*(b^2 - 2*a*c) - (A*b - 2*a*B)*c*x^2)/(2*a*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) + ((4*a^2*B*c + A*(b^
3 - 6*a*b*c))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a^2*(b^2 - 4*a*c)^(3/2)) + (A*Log[x])/a^2 - (A*Log[
a + b*x^2 + c*x^4])/(4*a^2)

________________________________________________________________________________________

Rubi [A]  time = 0.33067, antiderivative size = 150, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.28, Rules used = {1251, 822, 800, 634, 618, 206, 628} \[ \frac{\left (4 a^2 B c+A \left (b^3-6 a b c\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{3/2}}-\frac{A \log \left (a+b x^2+c x^4\right )}{4 a^2}+\frac{A \log (x)}{a^2}-\frac{-A \left (b^2-2 a c\right )+c x^2 (-(A b-2 a B))+a b B}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/(x*(a + b*x^2 + c*x^4)^2),x]

[Out]

-(a*b*B - A*(b^2 - 2*a*c) - (A*b - 2*a*B)*c*x^2)/(2*a*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) + ((4*a^2*B*c + A*(b^
3 - 6*a*b*c))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a^2*(b^2 - 4*a*c)^(3/2)) + (A*Log[x])/a^2 - (A*Log[
a + b*x^2 + c*x^4])/(4*a^2)

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 822

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp
[((d + e*x)^(m + 1)*(f*(b*c*d - b^2*e + 2*a*c*e) - a*g*(2*c*d - b*e) + c*(f*(2*c*d - b*e) - g*(b*d - 2*a*e))*x
)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)), x] + Dist[1/((p + 1)*(b^2 - 4*a*
c)*(c*d^2 - b*d*e + a*e^2)), Int[(d + e*x)^m*(a + b*x + c*x^2)^(p + 1)*Simp[f*(b*c*d*e*(2*p - m + 2) + b^2*e^2
*(p + m + 2) - 2*c^2*d^2*(2*p + 3) - 2*a*c*e^2*(m + 2*p + 3)) - g*(a*e*(b*e - 2*c*d*m + b*e*m) - b*d*(3*c*d -
b*e + 2*c*d*p - b*e*p)) + c*e*(g*(b*d - 2*a*e) - f*(2*c*d - b*e))*(m + 2*p + 4)*x, x], x], x] /; FreeQ[{a, b,
c, d, e, f, g, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && LtQ[p, -1] && (IntegerQ[m] ||
 IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{A+B x^2}{x \left (a+b x^2+c x^4\right )^2} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{A+B x}{x \left (a+b x+c x^2\right )^2} \, dx,x,x^2\right )\\ &=-\frac{a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\operatorname{Subst}\left (\int \frac{-A \left (b^2-4 a c\right )-(A b-2 a B) c x}{x \left (a+b x+c x^2\right )} \, dx,x,x^2\right )}{2 a \left (b^2-4 a c\right )}\\ &=-\frac{a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\operatorname{Subst}\left (\int \left (\frac{A \left (-b^2+4 a c\right )}{a x}+\frac{2 a^2 B c+A \left (b^3-5 a b c\right )+A c \left (b^2-4 a c\right ) x}{a \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )}{2 a \left (b^2-4 a c\right )}\\ &=-\frac{a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \log (x)}{a^2}-\frac{\operatorname{Subst}\left (\int \frac{2 a^2 B c+A \left (b^3-5 a b c\right )+A c \left (b^2-4 a c\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \log (x)}{a^2}-\frac{A \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^2}-\frac{\left (4 a^2 B c+A \left (b^3-6 a b c\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{A \log (x)}{a^2}-\frac{A \log \left (a+b x^2+c x^4\right )}{4 a^2}+\frac{\left (4 a^2 B c+A \left (b^3-6 a b c\right )\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 a^2 \left (b^2-4 a c\right )}\\ &=-\frac{a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\left (4 a^2 B c+A \left (b^3-6 a b c\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a^2 \left (b^2-4 a c\right )^{3/2}}+\frac{A \log (x)}{a^2}-\frac{A \log \left (a+b x^2+c x^4\right )}{4 a^2}\\ \end{align*}

Mathematica [A]  time = 0.351148, size = 243, normalized size = 1.62 \[ \frac{-\frac{\left (4 a^2 B c+A \left (b^2 \sqrt{b^2-4 a c}-4 a c \sqrt{b^2-4 a c}-6 a b c+b^3\right )\right ) \log \left (-\sqrt{b^2-4 a c}+b+2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}+\frac{\left (4 a^2 B c+A \left (-b^2 \sqrt{b^2-4 a c}+4 a c \sqrt{b^2-4 a c}-6 a b c+b^3\right )\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac{2 a \left (a B \left (b+2 c x^2\right )-A \left (-2 a c+b^2+b c x^2\right )\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+4 A \log (x)}{4 a^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/(x*(a + b*x^2 + c*x^4)^2),x]

[Out]

((-2*a*(a*B*(b + 2*c*x^2) - A*(b^2 - 2*a*c + b*c*x^2)))/((b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) + 4*A*Log[x] - ((4
*a^2*B*c + A*(b^3 - 6*a*b*c + b^2*Sqrt[b^2 - 4*a*c] - 4*a*c*Sqrt[b^2 - 4*a*c]))*Log[b - Sqrt[b^2 - 4*a*c] + 2*
c*x^2])/(b^2 - 4*a*c)^(3/2) + ((4*a^2*B*c + A*(b^3 - 6*a*b*c - b^2*Sqrt[b^2 - 4*a*c] + 4*a*c*Sqrt[b^2 - 4*a*c]
))*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(b^2 - 4*a*c)^(3/2))/(4*a^2)

________________________________________________________________________________________

Maple [B]  time = 0.017, size = 361, normalized size = 2.4 \begin{align*} -{\frac{c{x}^{2}Ab}{2\,a \left ( c{x}^{4}+b{x}^{2}+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{c{x}^{2}B}{ \left ( c{x}^{4}+b{x}^{2}+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{Ac}{ \left ( c{x}^{4}+b{x}^{2}+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}-{\frac{A{b}^{2}}{2\,a \left ( c{x}^{4}+b{x}^{2}+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{bB}{ \left ( 2\,c{x}^{4}+2\,b{x}^{2}+2\,a \right ) \left ( 4\,ac-{b}^{2} \right ) }}-{\frac{c\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) A}{a \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) A{b}^{2}}{4\,{a}^{2} \left ( 4\,ac-{b}^{2} \right ) }}-3\,{\frac{Abc}{a \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{A{b}^{3}}{2\,{a}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ) \left ( 4\,ac-{b}^{2} \right ) ^{-{\frac{3}{2}}}}+2\,{\frac{Bc}{ \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{A\ln \left ( x \right ) }{{a}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/x/(c*x^4+b*x^2+a)^2,x)

[Out]

-1/2/a/(c*x^4+b*x^2+a)*c/(4*a*c-b^2)*x^2*A*b+1/(c*x^4+b*x^2+a)*c/(4*a*c-b^2)*x^2*B+1/(c*x^4+b*x^2+a)/(4*a*c-b^
2)*A*c-1/2/a/(c*x^4+b*x^2+a)/(4*a*c-b^2)*A*b^2+1/2/(c*x^4+b*x^2+a)/(4*a*c-b^2)*b*B-1/a/(4*a*c-b^2)*c*ln(c*x^4+
b*x^2+a)*A+1/4/a^2/(4*a*c-b^2)*ln(c*x^4+b*x^2+a)*A*b^2-3/a/(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1
/2))*A*b*c+1/2/a^2/(4*a*c-b^2)^(3/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*A*b^3+2/(4*a*c-b^2)^(3/2)*arctan((2
*c*x^2+b)/(4*a*c-b^2)^(1/2))*B*c+A*ln(x)/a^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x/(c*x^4+b*x^2+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 5.75849, size = 2160, normalized size = 14.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x/(c*x^4+b*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/4*(2*B*a^2*b^3 - 2*A*a*b^4 - 16*A*a^3*c^2 - 2*(4*(2*B*a^3 - A*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 3*A*a^2*b^2)*c + (A*a*b^4 - 8*A*a^2*b^2*c + 16*A*a^3*c^2 + (A
*b^4*c - 8*A*a*b^2*c^2 + 16*A*a^2*c^3)*x^4 + (A*b^5 - 8*A*a*b^3*c + 16*A*a^2*b*c^2)*x^2)*log(c*x^4 + b*x^2 + a
) - 4*(A*a*b^4 - 8*A*a^2*b^2*c + 16*A*a^3*c^2 + (A*b^4*c - 8*A*a*b^2*c^2 + 16*A*a^2*c^3)*x^4 + (A*b^5 - 8*A*a*
b^3*c + 16*A*a^2*b*c^2)*x^2)*log(x))/(a^3*b^4 - 8*a^4*b^2*c + 16*a^5*c^2 + (a^2*b^4*c - 8*a^3*b^2*c^2 + 16*a^4
*c^3)*x^4 + (a^2*b^5 - 8*a^3*b^3*c + 16*a^4*b*c^2)*x^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/x/(c*x**4+b*x**2+a)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 19.8669, size = 271, normalized size = 1.81 \begin{align*} -\frac{{\left (A b^{3} + 4 \, B a^{2} c - 6 \, A a b c\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} \sqrt{-b^{2} + 4 \, a c}} - \frac{A \log \left (c x^{4} + b x^{2} + a\right )}{4 \, a^{2}} + \frac{A \log \left (x^{2}\right )}{2 \, a^{2}} + \frac{A b^{2} c x^{4} - 4 \, A a c^{2} x^{4} + A b^{3} x^{2} - 4 \, B a^{2} c x^{2} - 2 \, A a b c x^{2} - 2 \, B a^{2} b + 3 \, A a b^{2} - 8 \, A a^{2} c}{4 \,{\left (c x^{4} + b x^{2} + a\right )}{\left (a^{2} b^{2} - 4 \, a^{3} c\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x/(c*x^4+b*x^2+a)^2,x, algorithm="giac")

[Out]

-1/2*(A*b^3 + 4*B*a^2*c - 6*A*a*b*c)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/((a^2*b^2 - 4*a^3*c)*sqrt(-b^2 +
 4*a*c)) - 1/4*A*log(c*x^4 + b*x^2 + a)/a^2 + 1/2*A*log(x^2)/a^2 + 1/4*(A*b^2*c*x^4 - 4*A*a*c^2*x^4 + A*b^3*x^
2 - 4*B*a^2*c*x^2 - 2*A*a*b*c*x^2 - 2*B*a^2*b + 3*A*a*b^2 - 8*A*a^2*c)/((c*x^4 + b*x^2 + a)*(a^2*b^2 - 4*a^3*c
))